package com.siao.display
{
	
	/**
	 * 外边距对象
	 * @author SiaoLeon
	 */
	public class Margin
	{
		// -------------------------------------------------------------------------------------------------------- 静态常量
		
		// -------------------------------------------------------------------------------------------------------- 静态变量
		
		// -------------------------------------------------------------------------------------------------------- 静态方法
		
		// -------------------------------------------------------------------------------------------------------- 静态函数
		
		// -------------------------------------------------------------------------------------------------------- 属性
		
		private var _left:Number;
		
		/**
		 * 左侧距离
		 * @return
		 */
		public function get left():Number
		{
			return this._left;
		}
		
		public function set left(value:Number):void
		{
			this._left = value;
		}
		
		private var _top:Number;
		
		/**
		 * 顶部距离
		 * @return
		 */
		public function get top():Number
		{
			return this._top;
		}
		
		public function set top(value:Number):void
		{
			this._top = value;
		}
		
		private var _right:Number;
		
		/**
		 * 右侧距离
		 * @return
		 */
		public function get right():Number
		{
			return this._right;
		}
		
		public function set right(value:Number):void
		{
			this._right = value;
		}
		
		private var _bottom:Number;
		
		/**
		 * 底部距离
		 * @return
		 */
		public function get bottom():Number
		{
			return this._bottom;
		}
		
		public function set bottom(value:Number):void
		{
			this._bottom = value;
		}
		
		// -------------------------------------------------------------------------------------------------------- 变量
		
		// -------------------------------------------------------------------------------------------------------- 构造
		
		/**
		 * 构造函数
		 * @param left 左侧外边距
		 * @param top 顶部外边距
		 * @param right 右侧外边距
		 * @param bottom 底部外边距
		 */
		public function Margin(left:Number=0, top:Number=0, right:Number=0, bottom:Number=0)
		{
			this._left = left;
			this._top = top;
			this._right = right;
			this._bottom = bottom;
		}
		
		// -------------------------------------------------------------------------------------------------------- 方法
		
		public function toString():String
		{
			return "[Margin(left:" + this.left + ",top:" + this.top + ",right:" + this.right + ",bottom:" + this.bottom + ")]";
		}
	
		// -------------------------------------------------------------------------------------------------------- 函数
	
	}
}
